'''
Created on 2017年5月25日

@author: lingxiang
'''
import os

  
# os.walk()遍历文件夹下的所有文件
# os.walk()获得三组数据(rootdir, dirname,filnames)

def file_name(): 
    grader_father=os.path.abspath(os.path.dirname("text.py")+os.path.sep+"..")
    father_path=os.path.abspath(os.path.dirname("text.py")+os.path.sep+".")
     
    srcPath=r"main\text.txt"
    path=os.path.abspath(srcPath)
    print (path)
    
    proPath= os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) 
    txtPath=proPath+"\\zyproxy\\main\\later.txt"
    print (txtPath)
    print (os.path.isfile(txtPath))
    print (os.path.exists(txtPath))
#     L=[]   
#     for root, dirs, files in os.walk(file_dir):  
#         for file in files:  
#             if os.path.splitext(file)[1] == '.txt':  
#                 L.append(os.path.join(root, file))  
#     return L
def print_word():
    print("测试")
def test():
    t = [1,2,3,4,5]
    print(t[0:5])
if __name__ == '__main__':
    test()